import java.util.Scanner;

/*将一句话的单词进行倒置，
标点不倒置。比如 I like beijing.
经过函数后变为：beijing. like I
 */
public class Two2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String str = sc.nextLine();
            String[] str1 = str.split(" ");
            StringBuilder builder = new StringBuilder();
            for (int i = str1.length-1; i >=0 ; i--) {

                builder.append(str1[i]);
                if(i!=0){
                    builder.append(" ");
                }
            }
            System.out.println(builder);
        }
    }
}
